home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / Development Tools & Languages / Dylan Related / Mindy / Mindy 1.2 - portable sources / comp / src.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-15  |  22.7 KB  |  802 lines  |  [TEXT/ttxt]

  1. /**********************************************************************\
  2. *
  3. *  Copyright (c) 1994  Carnegie Mellon University
  4. *  All rights reserved.
  5. *  
  6. *  Use and copying of this software and preparation of derivative
  7. *  works based on this software are permitted, including commercial
  8. *  use, provided that the following conditions are observed:
  9. *  
  10. *  1. This copyright notice must be retained in full on any copies
  11. *     and on appropriate parts of any derivative works.
  12. *  2. Documentation (paper or online) accompanying any system that
  13. *     incorporates this software, or any part of it, must acknowledge
  14. *     the contribution of the Gwydion Project at Carnegie Mellon
  15. *     University.
  16. *  
  17. *  This software is made available "as is".  Neither the authors nor
  18. *  Carnegie Mellon University make any warranty about the software,
  19. *  its performance, or its conformity to any specification.
  20. *  
  21. *  Bug reports, questions, comments, and suggestions should be sent by
  22. *  E-mail to the Internet address "gwydion-bugs@cs.cmu.edu".
  23. *
  24. ***********************************************************************
  25. *
  26. * $Header: src.h,v 1.16 94/10/05 20:56:05 nkramer Exp $
  27. *
  28. \**********************************************************************/
  29.  
  30.  
  31. typedef unsigned int flags_t;
  32.  
  33. #define flag_OPEN 1
  34. #define flag_SEALED 2
  35. #define flag_ABSTRACT 4
  36. #define flag_CONCRETE 8
  37. #define flag_PRIMARY 16
  38. #define flag_FREE 32
  39.  
  40. struct body {
  41.     struct constituent *head;
  42.     struct constituent **tail;
  43. };
  44.  
  45. enum constituent_kind {
  46.     constituent_DEFCONST, constituent_DEFVAR, constituent_DEFMETHOD,
  47.     constituent_DEFGENERIC, constituent_DEFCLASS, constituent_EXPR,
  48.     constituent_LOCAL, constituent_HANDLER, constituent_LET,
  49.     constituent_TOPLEVELFORM, constituent_ERROR, constituent_DEFMODULE,
  50.     constituent_DEFLIBRARY, constituent_Kinds
  51. };
  52.  
  53. struct constituent {
  54.     enum constituent_kind kind;
  55.     struct constituent *next;
  56. };
  57.  
  58. struct defconst_constituent {
  59.     enum constituent_kind kind;
  60.     struct constituent *next;
  61.     int line;
  62.     struct bindings *bindings;
  63.     struct method *tlf;
  64. };
  65.  
  66. struct defvar_constituent {
  67.     enum constituent_kind kind;
  68.     struct constituent *next;
  69.     int line;
  70.     struct bindings *bindings;
  71.     struct method *tlf;
  72. };
  73.  
  74. struct defmethod_constituent {
  75.     enum constituent_kind kind;
  76.     struct constituent *next;
  77.     flags_t flags;
  78.     struct method *method;
  79.     struct method *tlf;
  80. };
  81.  
  82. struct defgeneric_constituent {
  83.     enum constituent_kind kind;
  84.     struct constituent *next;
  85.     flags_t flags;
  86.     struct id *name;
  87.     struct param_list *params;
  88.     struct return_type_list *rettypes;
  89.     struct plist *plist;
  90.     struct method *tlf;
  91. };
  92.  
  93. struct defclass_constituent {
  94.     enum constituent_kind kind;
  95.     struct constituent *next;
  96.     flags_t flags;
  97.     struct id *name;
  98.     struct superclass *supers;
  99.     struct slot_spec *slots;
  100.     struct initarg_spec *initargs;
  101.     struct inherited_spec *inheriteds;
  102.     struct method *tlf1;
  103.     struct method *tlf2;
  104. };
  105.  
  106. struct expr_constituent {
  107.     enum constituent_kind kind;
  108.     struct constituent *next;
  109.     struct expr *expr;
  110. };
  111.     
  112. struct binding_constituent {
  113.     enum constituent_kind kind;
  114.     struct constituent *next;
  115.     struct body *body;
  116. };
  117.  
  118. struct local_constituent {
  119.     enum constituent_kind kind;
  120.     struct constituent *next;
  121.     struct body *body;
  122.     int offset;
  123.     struct method *methods;
  124.     struct lexenv *lexenv;
  125. };
  126.  
  127. struct handler_constituent {
  128.     enum constituent_kind kind;
  129.     struct constituent *next;
  130.     struct body *body;
  131.     struct expr *type;
  132.     struct expr *func;
  133.     struct plist *plist;
  134. };
  135.  
  136. struct let_constituent {
  137.     enum constituent_kind kind;
  138.     struct constituent *next;
  139.     struct body *body;
  140.     int offset;
  141.     struct bindings *bindings;
  142.     int required;
  143.     struct lexenv *lexenv;
  144.     struct binding *inside;
  145. };
  146.  
  147. struct tlf_constituent {
  148.     enum constituent_kind kind;
  149.     struct constituent *next;
  150.     struct method *form;
  151. };
  152.  
  153. struct defnamespace_constituent {
  154.     enum constituent_kind kind;
  155.     struct constituent *next;
  156.     struct literal *name;
  157.     struct use_clause *use_clauses;
  158.     struct use_clause **use_tail;
  159.     struct variable_names *exported_variables;
  160.     struct variable_names *created_variables;
  161.     struct literal *exported_literal;
  162.     struct literal *created_literal;
  163. };
  164.  
  165. enum expr_kind {
  166.     expr_VARREF, expr_LITERAL, expr_CALL, expr_METHOD, expr_DOT,
  167.     expr_BODY, expr_BLOCK, expr_CASE, expr_IF, expr_FOR, expr_SELECT,
  168.     expr_VARSET, expr_BINOP_SERIES, expr_LOOP, expr_REPEAT,
  169.     expr_ERROR, expr_Kinds
  170. };
  171.  
  172. struct expr {
  173.     enum expr_kind kind;
  174.     boolean analized;
  175. };
  176.  
  177. struct varref_expr {
  178.     enum expr_kind kind;
  179.     boolean analized;
  180.     struct id *var;
  181.     struct method *home;
  182.     struct binding *binding;
  183.     struct closes_over *over;
  184. };
  185.  
  186. struct literal_expr {
  187.     enum expr_kind kind;
  188.     boolean analized;
  189.     struct literal *lit;
  190. };
  191.  
  192. struct call_expr {
  193.     enum expr_kind kind;
  194.     boolean analized;
  195.     struct expr *func;
  196.     struct function_info *info;
  197.     struct argument *args;
  198. };
  199.  
  200. struct method_expr {
  201.     enum expr_kind kind;
  202.     boolean analized;
  203.     struct method *method;
  204. };
  205.  
  206. struct dot_expr {
  207.     enum expr_kind kind;
  208.     boolean analized;
  209.     struct expr *arg;
  210.     struct expr *func;
  211. };
  212.  
  213. struct body_expr {
  214.     enum expr_kind kind;
  215.     boolean analized;
  216.     struct body *body;
  217. };
  218.  
  219. struct block_expr {
  220.     enum expr_kind kind;
  221.     boolean analized;
  222.     int line;
  223.     struct id *exit_fun;
  224.     struct body *body;
  225.     struct exception_clause *inner;
  226.     struct body *cleanup;
  227.     struct exception_clause *outer;
  228. };
  229.  
  230. struct case_expr {
  231.     enum expr_kind kind;
  232.     boolean analized;
  233.     struct condition_body *body;
  234. };
  235.  
  236. struct if_expr {
  237.     enum expr_kind kind;
  238.     boolean analized;
  239.     struct expr *cond;
  240.     struct body *consequent;
  241.     int else_line;
  242.     struct body *alternate;
  243. };
  244.  
  245. struct for_expr {
  246.     enum expr_kind kind;
  247.     boolean analized;
  248.     struct for_clause *clauses;
  249.     struct expr *until;
  250.     struct body *body;
  251.     struct body *finally;
  252. };
  253.  
  254. struct select_expr {
  255.     enum expr_kind kind;
  256.     boolean analized;
  257.     struct expr *expr;
  258.     struct expr *by;
  259.     struct condition_body *body;
  260. };
  261.  
  262. struct varset_expr {
  263.     enum expr_kind kind;
  264.     boolean analized;
  265.     struct id *var;
  266.     struct method *home;
  267.     struct binding *binding;
  268.     struct closes_over *over;
  269.     struct expr *value;
  270.     struct varref_expr *type;
  271. };
  272.  
  273. struct binop_series_expr {
  274.     enum expr_kind kind;
  275.     boolean analized;
  276.     struct expr *first_operand;
  277.     struct binop *first_binop;
  278. };
  279.  
  280. struct loop_expr {
  281.     enum expr_kind kind;
  282.     boolean analized;
  283.     struct body *body;
  284.     int position;
  285. };
  286.  
  287. struct repeat_expr {
  288.     enum expr_kind kind;
  289.     boolean analized;
  290.     struct loop_expr *loop;
  291. };
  292.  
  293. struct bindings {
  294.     struct param_list *params;
  295.     struct expr *expr;
  296. };
  297.  
  298. struct param_list {
  299.     struct param *required_params;
  300.     struct id *next_param;
  301.     struct id *rest_param;
  302.     boolean allow_keys;
  303.     boolean all_keys;
  304.     struct keyword_param *keyword_params;
  305. };
  306.  
  307. struct param {
  308.     struct id *id;
  309.     struct expr *type;
  310.     struct symbol *type_temp;
  311.     struct param *next;
  312. };
  313.  
  314. struct keyword_param {
  315.     struct symbol *keyword;
  316.     struct id *id;
  317.     struct expr *type;
  318.     struct symbol *type_temp;
  319.     struct expr *def;
  320.     struct keyword_param *next;
  321. };
  322.  
  323. struct id {
  324.     struct symbol *symbol;
  325.     boolean internal;
  326.     int line;
  327. };
  328.  
  329. struct method {
  330.     struct id *name;
  331.     int line;
  332.     struct literal *debug_name;
  333.     boolean top_level;
  334.     struct component *component;
  335.     struct param_list *params;
  336.     struct expr *specializers;
  337.     struct return_type_list *rettypes;
  338.     struct body *body;
  339.     struct method *next_local;
  340.     int nargs;
  341.     struct lexenv *lexenv;
  342.     int frame_size;
  343.     struct closes_over *closes_over;
  344.     int lexenv_size;
  345.     struct method *parent;
  346.     struct method *kids;
  347.     struct method *next;
  348. };
  349.  
  350. struct binop {
  351.     struct id *op;
  352.     int precedence;
  353.     boolean left_assoc;
  354.     struct expr *operand;
  355.     struct binop *next;
  356. };
  357.  
  358. struct argument {
  359.     struct expr *expr;
  360.     struct argument *next;
  361. };
  362.  
  363. struct plist {
  364.     struct property *head;
  365.     struct property **tail;
  366. };
  367.  
  368. struct property {
  369.     int line;
  370.     struct symbol *keyword;
  371.     struct expr *expr;
  372.     struct property *next;
  373. };
  374.  
  375. struct return_type_list {
  376.     struct return_type *req_types;
  377.     struct return_type **req_types_tail;
  378.     struct expr *req_types_list;
  379.     boolean restp;
  380.     struct expr *rest_type;
  381.     struct symbol *rest_temp;
  382.     struct expr *rest_temp_varref;
  383. };
  384.  
  385. struct return_type {
  386.     struct expr *type;
  387.     struct symbol *temp;
  388.     struct return_type *next;
  389. };
  390.  
  391. struct condition_body {
  392.     struct condition_clause *clause;
  393.     struct condition_body *next;
  394. };
  395.  
  396. struct condition_clause {
  397.     struct condition *conditions;
  398.     struct body *body;
  399. };
  400.  
  401. struct condition {
  402.     struct expr *cond;
  403.     struct condition *next;
  404. };
  405.  
  406. struct exception_clause {
  407.     struct expr *type;
  408.     struct id *condition;
  409.     struct plist *plist;
  410.     struct body *body;
  411.     struct exception_clause *next;
  412. };
  413.  
  414. enum for_clause_kind {
  415.     for_EQUAL_THEN, for_IN, for_FROM, for_Kinds
  416. };
  417.  
  418. struct for_clause {
  419.     enum for_clause_kind kind;
  420.     struct for_clause *next;
  421.     struct param_list *vars;
  422. };
  423.  
  424. struct equal_then_for_clause {
  425.     enum for_clause_kind kind;
  426.     struct for_clause *next;
  427.     struct param_list *vars;
  428.     struct expr *equal;
  429.     struct expr *then;
  430. };
  431.  
  432. struct in_for_clause {
  433.     enum for_clause_kind kind;
  434.     struct for_clause *next;
  435.     struct param_list *vars;
  436.     struct expr *collection;
  437. };
  438.  
  439. enum to_kind {
  440.     to_TO, to_ABOVE, to_BELOW, to_UNBOUNDED, to_Kinds
  441. };
  442.  
  443. struct from_for_clause {
  444.     enum for_clause_kind kind;
  445.     struct for_clause *next;
  446.     struct param_list *vars;
  447.     struct expr *from;
  448.     enum to_kind to_kind;
  449.     struct expr *to;
  450.     struct expr *by;
  451. };
  452.  
  453. struct superclass {
  454.     struct expr *expr;
  455.     struct superclass *next;
  456. };
  457.  
  458. enum slot_allocation {
  459.     alloc_INSTANCE, alloc_CLASS, alloc_SUBCLASS, alloc_CONSTANT, alloc_VIRTUAL,
  460.     alloc_Kinds
  461. };
  462.  
  463. struct slot_spec {
  464.     int line;
  465.     flags_t flags;
  466.     enum slot_allocation alloc;
  467.     struct id *name;
  468.     struct expr *type;
  469.     struct plist *plist;
  470.     struct id *getter;
  471.     struct id *setter;
  472.     struct slot_spec *next;
  473. };
  474.  
  475. struct initarg_spec {
  476.     boolean required;
  477.     struct symbol *keyword;
  478.     struct plist *plist;
  479.     struct initarg_spec *next;
  480. };
  481.  
  482. struct inherited_spec {
  483.     struct id *name;
  484.     struct plist *plist;
  485.     struct inherited_spec *next;
  486. };
  487.  
  488. struct variable_names {
  489.     struct variable_name *head;
  490.     struct variable_name **tail;
  491. };
  492.  
  493. struct variable_name {
  494.     struct literal *name;
  495.     struct variable_name *next;
  496. };
  497.  
  498. enum useopt_kind {
  499.     useopt_PREFIX, useopt_IMPORT, useopt_EXCLUDE, useopt_RENAME, useopt_EXPORT,
  500.     useopt_IMPORT_ALL, useopt_EXPORT_ALL
  501. };
  502.  
  503. struct use_options {
  504.     struct use_option *head;
  505.     struct use_option **tail;
  506. };
  507.  
  508. struct use_option {
  509.     enum useopt_kind kind;
  510.     struct use_option *next;
  511. };
  512.  
  513. struct prefix_option {
  514.     enum useopt_kind kind;
  515.     struct use_option *next;
  516.     struct literal *prefix;
  517. };
  518.  
  519. struct renamings {
  520.     struct renaming *head;
  521.     struct renaming **tail;
  522. };
  523.  
  524. struct renaming {
  525.     struct literal *from;
  526.     struct literal *to;
  527.     struct renaming *next;
  528. };
  529.  
  530. struct import_option {
  531.     enum useopt_kind kind;
  532.     struct use_option *next;
  533.     struct variable_names *vars;
  534.     struct renamings *renames;
  535. };
  536.  
  537. struct exclude_option {
  538.     enum useopt_kind kind;
  539.     struct use_option *next;
  540.     struct variable_names *vars;
  541. };
  542.  
  543. struct rename_option {
  544.     enum useopt_kind kind;
  545.     struct use_option *next;
  546.     struct renamings *renames;
  547. };
  548.  
  549. struct export_option {
  550.     enum useopt_kind kind;
  551.     struct use_option *next;
  552.     struct variable_names *vars;
  553. };
  554.  
  555. struct use_clause {
  556.     struct literal *name;
  557.     struct use_option *options;
  558.     struct use_clause *next;
  559.     struct literal *import;
  560.     struct literal *exclude;
  561.     struct literal *prefix;
  562.     struct literal *rename;
  563.     struct literal *export;
  564. };
  565.  
  566. /* Various structures we reference, but don't know the details of. */
  567. struct token;
  568. struct local_methods;
  569. struct binop_series;
  570. struct arglist;
  571. struct block_epilog;
  572. struct incomplete_condition_body;
  573. struct exception_clauses;
  574. struct superclass_list;
  575. struct for_header;
  576. struct gf_suffix;
  577. struct to_part;
  578. struct class_guts;
  579. struct else_part;
  580.  
  581. extern struct body *make_body(void);
  582. extern struct body
  583.     *add_constituent(struct body *body, struct constituent *constituent);
  584. extern struct body *make_expr_body(struct expr *expr);
  585. extern struct constituent
  586.     *make_define_constant(int line, struct bindings *bindings);
  587. extern struct constituent
  588.     *make_define_method(flags_t flags, struct method *method);
  589. extern struct constituent
  590.     *make_define_variable(int line, struct bindings *bindings);
  591. extern struct constituent *make_expr_constituent(struct expr *expr);
  592. extern struct constituent *make_let(struct bindings *bindings);
  593. extern struct constituent *make_handler(struct expr *type, struct expr *func,
  594.                     struct plist *plist);
  595. extern struct constituent
  596.     *make_local_constituent(struct local_methods *methods);
  597. extern struct constituent
  598.     *make_top_level_form(char *debug_name, struct constituent *c);
  599. extern struct expr *make_varref(struct id *id);
  600. extern struct expr *make_varset(struct id *var, struct expr *expr);
  601. extern struct id *id(struct symbol *symbol);
  602. extern struct id *dup_id(struct id *id);
  603. extern struct id *make_id(struct token *token);
  604. extern struct bindings *make_bindings(struct param_list *params,
  605.                       struct expr *expr);
  606. extern struct param_list *make_param_list(void);
  607. extern struct param_list *push_param(struct param *param,
  608.                      struct param_list *list);
  609. extern struct param_list *set_rest_param(struct param_list *list,
  610.                      struct id *id);
  611. extern struct param *make_param(struct id *id, struct expr *type);
  612. extern struct local_methods *add_local_method(struct local_methods *methods,
  613.                           struct method *method);
  614. extern struct local_methods *make_local_methods(void);
  615. extern struct expr *make_literal_ref(struct literal *lit);
  616. extern struct expr
  617.     *make_binop_series_expr(struct expr *operand, struct binop_series *series);
  618. extern struct binop_series *make_binop_series(void);
  619. extern struct binop_series
  620.     *add_binop(struct binop_series *series, struct binop *op,
  621.            struct expr *operand);
  622. extern struct binop *make_binop(struct id *id);
  623. extern struct expr *make_negate(struct expr *expr);
  624. extern struct expr *make_not(struct expr *expr);
  625. extern struct expr
  626.     *make_aref_or_element(struct expr *expr, struct arglist *args);
  627. extern struct expr
  628.     *make_function_call(struct expr *expr, struct arglist *args);
  629. extern struct expr *make_method_ref(struct method *method);
  630. extern struct expr *make_dot_operation(struct expr *expr, struct expr *fn);
  631. extern struct arglist *make_argument_list(void);
  632. extern struct arglist *add_argument(struct arglist *arglist,
  633.                     struct argument *arg);
  634. extern struct argument *make_argument(struct expr *expr);
  635. extern struct argument
  636.     *make_keyword_argument(struct token *keyword, struct expr *expr);
  637. extern struct plist *make_property_list(void);
  638. extern struct plist
  639.     *add_property(struct plist *plist, struct token *keyword,
  640.           struct expr *expr);
  641. extern struct return_type_list *make_return_type_list(boolean restp,
  642.                               struct expr *rest);
  643. extern struct return_type_list *add_return_type(struct return_type_list *l,
  644.                         struct expr *type);
  645. extern struct return_type_list
  646.     *set_return_type_rest_type(struct return_type_list *l,
  647.                    struct expr *type);
  648. extern struct literal *parse_true_token(struct token *token);
  649. extern struct literal *parse_false_token(struct token *token);
  650. extern struct literal *parse_string_token(struct token *token);
  651. extern struct literal
  652.     *concat_string_token(struct literal *old_literal, struct token *token);
  653. extern struct literal *parse_character_token(struct token *token);
  654. extern struct literal *parse_integer_token(struct token *token);
  655. extern struct literal *parse_float_token(struct token *token);
  656. extern struct literal *parse_symbol_token(struct token *token);
  657. extern struct literal *parse_keyword_token(struct token *token);
  658. extern struct expr *make_body_expr(struct body *body);
  659. extern struct expr *make_block(int line, struct id *exit, struct body *body,
  660.                    struct block_epilog *epilog);
  661. extern struct expr *make_case(struct condition_body *body);
  662. extern struct expr *make_if(struct expr *cond, struct body *consequent,
  663.                 struct else_part *else_part);
  664. extern struct else_part *make_else(int else_line, struct body *alternate);
  665. extern struct expr *make_for(struct for_header *header, struct body *body,
  666.                  struct body *finally);
  667. extern struct expr *make_select(struct expr *expr, struct expr *by,
  668.                 struct condition_body *body);
  669. extern struct expr *make_loop(struct body *body);
  670. extern struct expr *make_repeat(void);
  671. extern struct block_epilog *make_block_epilog(struct exception_clauses *inner,
  672.                           struct body *cleanup,
  673.                           struct exception_clauses *outer);
  674. extern struct for_header *make_for_header(struct expr *until);
  675. extern struct for_header *push_for_clause(struct for_clause *clause,
  676.                       struct for_header *header);
  677. extern struct exception_clauses *make_exception_clauses(void);
  678. extern struct exception_clauses
  679.     *add_exception_clause(struct exception_clauses *clauses,
  680.               struct exception_clause *clause);
  681. extern struct exception_clause
  682.     *make_exception_clause(struct expr *type, struct id *condition,
  683.                struct plist *plist, struct body *body);
  684. extern struct condition_body
  685.     *push_condition_clause(struct condition_clause *clause,
  686.                struct condition_body *cond_body);
  687. extern struct condition_clause
  688.     *make_otherwise_condition_clause(struct body *body);
  689. extern struct incomplete_condition_body
  690.     *make_incomplete_condition_clauses(struct constituent *constituent,
  691.                        struct condition_body *rest);
  692. extern struct incomplete_condition_body
  693.     *push_condition_constituent(struct constituent *constituent,
  694.                 struct incomplete_condition_body *body);
  695. extern struct condition_body
  696.     *complete_condition_clauses(struct condition_clause *clause,
  697.                 struct incomplete_condition_body *body);
  698. extern struct condition_clause
  699.     *make_condition_clause(struct constituent *constituent);
  700. extern struct condition_clause
  701.     *push_condition(struct expr *cond, struct condition_clause *clause);
  702. extern struct for_clause
  703.     *make_equal_then_for_clause(struct param_list *vars, struct expr *equal,
  704.                 struct expr *then);
  705. extern struct for_clause
  706.     *make_in_for_clause(struct param *var, struct param *keyed_by,
  707.             struct expr *collection);
  708. extern struct for_clause
  709.     *make_from_for_clause(struct param *var, struct expr *from,
  710.               struct to_part *to, struct expr *by);
  711. extern struct to_part *make_to(struct expr *expr);
  712. extern struct to_part *make_above(struct expr *expr);
  713. extern struct to_part *make_below(struct expr *expr);
  714. extern struct constituent
  715.     *make_class_definition(struct id *name, struct superclass_list *supers,
  716.                struct class_guts *guts);
  717. extern struct constituent
  718.     *set_class_flags(flags_t flags, struct constituent *defclass);
  719. extern struct superclass_list *make_superclass_list(void);
  720. extern struct superclass_list
  721.     *add_superclass(struct superclass_list *list, struct expr *expr);
  722. extern struct class_guts *make_class_guts(void);
  723. extern struct slot_spec
  724.     *make_slot_spec(int line, flags_t flags, enum slot_allocation alloc,
  725.             struct id *name, struct expr *type, struct plist *plist);
  726. extern struct class_guts
  727.     *add_slot_spec(struct class_guts *guts, struct slot_spec *spec);
  728. extern struct initarg_spec
  729.     *make_initarg_spec(boolean required, struct token *keyword,
  730.                struct plist *plist);
  731. extern struct class_guts
  732.     *add_initarg_spec(struct class_guts *guts, struct initarg_spec *spec);
  733. extern struct inherited_spec
  734.     *make_inherited_spec(struct id *name, struct plist *plist);
  735. extern struct class_guts
  736.     *add_inherited_spec(struct class_guts *guts, struct inherited_spec *spec);
  737. extern struct constituent
  738.     *make_define_generic(struct id *name, struct param_list *params,
  739.              struct gf_suffix *suffix);
  740. extern struct constituent
  741.     *set_generic_flags(flags_t flags, struct constituent *defgeneric);
  742. extern struct gf_suffix
  743.     *make_gf_suffix(struct return_type_list *rettypes,
  744.             struct plist *plist);
  745. extern struct param_list
  746.     *push_keyword_param(struct keyword_param *param, struct param_list *list);
  747. extern struct param_list *allow_keywords(struct param_list *param_list);
  748. extern struct param_list *allow_all_keywords(struct param_list *param_list);
  749. extern struct keyword_param
  750.     *make_keyword_param(struct token *keyword, struct id *sym,
  751.             struct expr *type, struct expr *def);
  752. extern struct method
  753.     *set_method_source(struct token *source, struct method *method);
  754. extern struct method
  755.     *set_method_name(struct id *name, struct method *method);
  756. extern struct method
  757.     *make_top_level_method(char *debug_name, struct body *body);
  758. extern struct method
  759.     *make_method_description(struct param_list *params,
  760.                  struct return_type_list *rettypes,
  761.                  struct body *body);
  762. extern struct expr *make_singleton(struct expr *expr);
  763. extern struct param_list
  764.     *set_next_param(struct param_list *list, struct id *var);
  765. extern struct constituent *make_error_constituent(void);
  766. extern struct expr *make_error_expr(void);
  767. extern struct defnamespace_constituent *make_define_module(void);
  768. extern struct defnamespace_constituent *make_define_library(void);
  769. extern struct defnamespace_constituent
  770.     *set_namespace_name(struct defnamespace_constituent *namespace,
  771.             struct token *name);
  772. extern struct defnamespace_constituent
  773.     *add_use_clause(struct defnamespace_constituent *namespace,
  774.             struct use_clause *clause);
  775. extern struct defnamespace_constituent
  776.     *add_exports(struct defnamespace_constituent *namespace,
  777.          struct variable_names *vars);
  778. extern struct defnamespace_constituent
  779.     *add_creates(struct defnamespace_constituent *namespace,
  780.          struct variable_names *vars);
  781. extern struct use_clause
  782.     *make_use_clause(struct token *symbol, struct use_options *options);
  783. extern struct use_options *make_use_options(void);
  784. extern struct use_options
  785.     *add_use_option(struct use_options *options, struct use_option *option);
  786. extern struct use_option *make_use_option(enum useopt_kind kind);
  787. extern struct use_option *make_prefix_option(struct token *token);
  788. extern struct variable_names *make_variable_names(void);
  789. extern struct variable_names
  790.     *add_variable_name(struct variable_names *names, struct token *token);
  791. extern struct renamings *make_renamings(void);
  792. extern struct renamings
  793.     *add_renaming(struct renamings *names,
  794.           struct token *from, struct token *to);
  795. extern struct import_option *make_import_option(void);
  796. extern struct import_option
  797.     *add_import(struct import_option *opt,
  798.         struct token *from, struct token *to);
  799. extern struct use_option *make_exclude_option(struct variable_names *vars);
  800. extern struct use_option *make_export_option(struct variable_names *vars);
  801. extern struct use_option *make_rename_option(struct renamings *lst);
  802.